package com.example.schooljava.pojo.dto;

import com.example.schooljava.util.ValidationGroups;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.NotBlank;

/**
 * 接收新建、编辑班级的参数
 *
 * @author: LDH
 * @date: 2022年08月31日 22:22
 */
@ApiModel(value = "接收班级新建与编辑的实体", description = "")
@Data
public class AddClassDTO {

    @ApiModelProperty("Class表的id")
    @NotBlank(message = "班级id不能为空", groups = ValidationGroups.Update.class)
    private String id;

    @ApiModelProperty("班级表的年级属性")
    @NotBlank(message = "年级不能为空", groups = {ValidationGroups.Add.class, ValidationGroups.Update.class})
    private int grade;

    @ApiModelProperty("班级表的name属性")
    @NotBlank(message = "班级名不能为空", groups = {ValidationGroups.Add.class, ValidationGroups.Update.class})
    private int name;

    @ApiModelProperty("班主任id(tno)")
    @NotBlank(message = "班主任不能为空", groups = ValidationGroups.Add.class)
    private String headmaster;

    @ApiModelProperty("班级助理id(tno)）")
    @NotBlank(message = "班级助理不能为空", groups = ValidationGroups.Add.class)
    private String assistant;

}